package cn.lxq.week01.testmysel;

public class Hello {
	private int count;
	private String text;
	
	public Hello(int count, String text) {
		this.count=count;
		this.text=text;
	}
	
	public int add(int c) {
		this.count += c;
		return this.count;
	}
	
	public void echo() {
		System.out.println(this.text + this.count);
	}
	public static void main(String[]args) {
		int c=5;
		int[] incs= {3,4,5,6};
		String s="abc";
		Hello hello = new Hello(c,s);
		if(null==hello) {
			return;
		}
		for(int inc:incs) {
			hello.add(inc);
			hello.echo();
		}
	}
}
